<template>
	<view class="myBox">
		<view class="topTitle flex-sp-center">
			<view class="Title">
				医联•互联网医院
				<view class="">
					开启美好的一天
				</view>
			</view>
			<view class="flex-center-center">
				<view class="ScanCode flex-center-center">
					<image src="@/static/my/scan.png" mode=""></image>
					扫一扫
				</view>
				<view class="tz" @click.stop="goinfo('pages/my/news/news')">
					<image src="@/static/CommonTools/tz.png" mode=""></image>
					<text v-if="data.unreadEntries>0">{{data.unreadEntries}}</text>
				</view>
			</view>
		</view>
		<view class="doctor">
			<view class="" @click="goinfo('pages/my/MyProfile/MyProfile')">
				<view class="title flex-center">
					<image :src="data.avatar" mode=""></image>
					<view class="nameBox">
						<view class="name">
							{{data.doctorName}} <text>{{data.titleName}}</text> <text>{{data.departName}}</text>
						</view>
						<view class="typeBox">
							<text v-if="data.levelName">{{data.levelName}}</text> {{data.hospitalName}}
						</view>
						<view class="setUp">
							点击设置资料
						</view>
					</view>
					<view class="code" @click.stop="Uppop()">
						<image src="@/static/my/code.png" mode=""></image>
					</view>
				</view>
			</view>
		</view>
		<view class="nav currency_card flex-sp-center">
			<view class="" @click="goinfo('pages/prescription/index')">
				<image src="@/static/my/cf.png" mode="aspectFit"></image> 我的处方
			</view>
			<view class="" @click="goinfo('pages/my/MyTeam/teamList')">
				<image src="@/static/my/td.png" mode="aspectFit"></image> 我的团队
			</view>
			<view class="" @click="goinfo('pages/my/MyReview/MyReview')">
				<image src="@/static/my/pj.png" mode="aspectFit"></image> 我的评价
			</view>
		</view>
		<view class="currency_card configurationBox">
			<view class="configuration flex-sp-center" @click="goinfo('pages/my/bankCardList/bankCardList')">
				<view class="">
					<image src="@/static/my/11.png" mode="aspectFit"></image>银行卡
				</view>
				<view class="more">
					<uni-icons type="right" color="#999999" size="16"></uni-icons>
				</view>
			</view>
			<view class="configuration flex-sp-center" @click="goinfo('pages/my/ComplaintSuggestions/ComplaintSuggestions')">
				<view class="">
					<image src="@/static/my/12.png" mode="aspectFit"></image> 投诉建议
				</view>
				<view class="more">
					<uni-icons type="right" color="#999999" size="16"></uni-icons>
				</view>
			</view>
			<view class="configuration flex-sp-center" @click="goinfo()">
				<view class="">
					<image src="@/static/my/13.png" mode="aspectFit"></image>常见问题
				</view>
				<view class="more">
					<uni-icons type="right" color="#999999" size="16"></uni-icons>
				</view>
			</view>
			<view class="configuration flex-sp-center" @click="goinfo('pages/my/system/system')">
				<view class="">
					<image src="@/static/my/14.png" mode="aspectFit"></image>设置
				</view>
				<view class="more">
					<uni-icons type="right" color="#999999" size="16"></uni-icons>
				</view>
			</view>
			<view class="configuration flex-sp-center" @click="goinfo()">
				<view class="">
					<image src="@/static/my/15.png" mode="aspectFit"></image>关于我们
				</view>
				<view class="more">
					<uni-icons type="right" color="#999999" size="16"></uni-icons>
				</view>
			</view>
		</view>
		<uni-popup ref="popup" type="center">
			<view class="">
				<QRCode :code="data.userId"></QRCode>
			</view>
		</uni-popup>
		<UnauditedPup :data="data.auditStatus"></UnauditedPup>
	</view>
</template>

<script>
	import {
		getDoctorStatic
	} from '@/api/user'
	export default {
		data() {
			return {
				data: {}
			}
		},
		onShow() {
			this.getDoctorStatic()
		},
		methods: {
			Uppop() {
				this.$refs.popup.open('center')
			},
			getDoctorStatic() {
				getDoctorStatic().then(res => {
					this.data = res.data
				})
			},
			goinfo(e, id) {
				if (id) {
					uni.navigateTo({
						url: `/${e}?id=${id}`,
					})
				} else {
					uni.navigateTo({
						url: `/${e}`,
					})
				}
			},
		}
	}
</script>

<style lang="less" scopde>
	.myBox {
		min-height: 100vh;
		background-image: url(@/static/my/myBg.png);
		background-size: 100% 726rpx;
		background-repeat: no-repeat;
		padding: 51rpx 30rpx;
		box-sizing: border-box;

		.configurationBox {
			margin-top: 20rpx;
			padding: 0 20rpx;

			.text {
				font-size: 28rpx;
				font-weight: 500;
				color: #333;
				line-height: 40rpx;
				padding: 30rpx 0;
			}

			.configuration {
				font-size: 30rpx;
				font-weight: 500;
				color: #333333;
				height: 97rpx;
				border-bottom: 1px solid #eeeeee;

				&:last-child {
					border-bottom: none;
				}

				&>view {
					display: flex;
					align-items: center;
				}

				.more {
					font-size: 26rpx;
					color: #999999;
				}

				image {
					width: 47rpx;
					height: 38rpx;
					margin-right: 15rpx;
				}
			}

		}


		.nav {
			height: 123rpx;
			padding: 0 30rpx;

			view {
				font-weight: 500;
				font-size: 28rpx;
				display: flex;
				align-items: center;
				color: #333333;

				image {
					width: 42rpx;
					height: 45rpx;
					margin-right: 18rpx;
				}

			}
		}

		.doctor {
			width: 690rpx;
			min-height: 182rpx;
			border-radius: 30rpx;
			box-sizing: border-box;
			display: flex;
			align-items: center;
			justify-content: space-around;
			margin-bottom: 30rpx;

			&>view {
				width: 100%;
			}


			.title {
				.code {
					image {
						width: 63rpx;
						height: 60rpx;
					}
				}

				.nameBox {
					flex: 1;
				}

				.name {
					font-weight: bold;
					font-size: 32rpx;
					color: #333333;

					text {
						font-weight: 500;
						font-size: 24rpx;
						color: #666666;
						margin-left: 19rpx;
					}
				}

				image {
					width: 118rpx;
					height: 118rpx;
					border-radius: 50%;
					margin-right: 21rpx;
				}
			}

			.typeBox {
				margin-top: 5rpx;

				text {
					display: inline-block;
					width: 63rpx;
					height: 33rpx;
					background: #DEF7ED;
					border-radius: 10rpx;
					font-weight: 500;
					font-size: 22rpx;
					color: #23CC88;
					text-align: center;
					line-height: 33rpx;
					margin-right: 10rpx;
				}
			}

			.setUp {
				margin-top: 5rpx;
				font-weight: 500;
				font-size: 24rpx;
				color: #999999;
			}
		}

		.topTitle {
			.Title {
				font-weight: 800;
				font-size: 34rpx;
				color: #333333;

				view {
					font-weight: 500;
					font-size: 24rpx;
					color: #999999;
				}
			}

			.tz {
				position: relative;

				image {
					width: 60rpx;
					height: 68rpx;
				}

				text {
					display: inline-block;
					font-weight: 500;
					font-size: 22rpx;
					color: #FFFFFF;
					background: #FC5149;
					border-radius: 40rpx;
					padding: 0 5rpx;
					position: absolute;
					top: 0%;
					right: 0%;
				}
			}

			.ScanCode {
				width: 145rpx;
				height: 60rpx;
				border-radius: 35rpx;
				border: 2px solid #3E6EFE;
				font-weight: 500;
				font-size: 24rpx;
				color: #3E6EFE;
				margin-right: 32rpx;

				image {
					width: 24rpx;
					height: 24rpx;
					margin-right: 9rpx;
				}
			}
		}

	}
</style>